package com.twu.biblioteca;

import java.util.ArrayList;

public class checkout_movie {
    public boolean checkout_movie(String movie,ArrayList<movie> movie_list){
        for (int i =0; i< movie_list.size();i++){
            if (movie_list.get(i).getstatus() && movie_list.get(i).getMoviename().equals(movie)){
                movie_list.get(i).setStatus(false);
                System.out.println("Thank you! Enjoy the movie");
                return true;
            }
        }
        System.out.println("That movie is not available");
        return false;
    }
}
